1. Field of the Invention
This invention relates to the manufacture of integrated circuits and more specifically to the functional testing of microprocessors.
2. Description of the Relevant Art
In order to maintain compatibility with the vast amount of existing software developed for previous microprocessor products, many microprocessor manufacturers continue to develop new products which execute the instructions of previous products. Performances of new microprocessors are typically enhanced by the additions of new operating modes and features. The operating mode of a modem microprocessor is typically selected under software control, and each feature of the modem microprocessor is enabled or disabled by system hardware or software. Each allowable combination of operating mode and enabled feature creates a new and different operating environment in which instructions may be executed by the microprocessor. Compared to their predecessors, modern microprocessors have a relatively large number of possible operating environments.
For example, newer x86 microprocessors are designed to maintain software compatibility with previous 80x86 microprocessor generations (e.g., 8086/8, 80286, 80386, and 80486). These newer x86 microprocessors have two primary operating modes called the real-address operating mode (i.e., real operating mode) and the protected operating mode. A third virtual-8086 operating mode (i.e., virtual operating mode) exists within the protected operating mode. In addition, a system management mode allows control over the amount of power dissipated by the microprocessor. Newer x86 microprocessors also have added hardware support for a memory management technique called paging. Paging may be enabled or disabled by system software. Newer x86 microprocessors also have cache memory systems located on the same integrated circuit (i.e., chip) or within the same semiconductor device package. Such on-chip and on-package caches operate under software control, and may be operated in a write-back mode, a write-through mode, or may be disabled. In addition, newer x86 microprocessors have features which allow them to operate in a multiprocessor environment (i.e., an environment in which two or more microprocessors share a common system bus). Thus newer x86 microprocessors may execute x86 instructions in a number of possible operating environments.
Errors in the design of a new microprocessor and defects introduced during manufacturing may cause the microprocessor to produce incorrect results during operation. Functional testing is typically performed to ensure that a microprocessor under test produces correct results in all possible operating environments. Thus with each added feature or operating mode, the task of functionally testing a new microprocessor is made more difficult. Newer x86 microprocessors described above exemplify this situation.
A functional test includes software instructions which cause a microprocessor under test to perform a desired activity and to produce a test result. The test result is compared to an expected test result derived from a functional specification of the microprocessor under test. Any difference between the test result produced by the microprocessor under test and the expected test result represents a failure of the functional test. Such a functional test failure may indicate improper microprocessor operation due to a design error or a manufacturing defect.
A microprocessor carries out a desired activity expressed as machine language code. Machine language code is a series of binary digits (i.e., digital ones and zeros) which represent machine language instructions and data. Assembly language programming allows a user to exert software control over a microprocessor while relieving the user of the need to think in terms of the binary digits of machine language code. As a result, most functional tests are written in assembly language code (i.e., assembly language instructions and data). An assembler is a software program which takes as input a file containing assembly language code, data, and assembler directives and produces a corresponding machine language code file. Execution of a functional test machine language code file causes a microprocessor under test to perform a desired activity and to produce a test result.
Assembly language instructions include instruction mnemonics and associated operands (i.e., identified registers, variable values, or constants). Instruction mnemonics are character strings readily identified with an instruction of a microprocessor instruction set. Examples of x86 microprocessor instruction mnemonics include `mov`, representing the x86 `move data` instruction, and `jmp`, representing the x86 `jump` instruction.
Assembler directives are commands to the assembler concerning input and output, memory organization, and instructions about how to prepare data for program use. Examples of assembler directives are `include` and `macro`. The `include filename` assembler directive directs the assembler to copy the contents of file filename in place of the `include filename` assembler directive during assembly. The `name macro` assembler directive associates a following group of software instructions with the symbolic name name. When the assembler encounters macro name name in a file during assembly, it substitutes the group of software instructions in place of name, resulting in in-line insertion of the group of software instructions associated with name into the file being assembled.
In the past, manufactured prototypes of a new microprocessor were required in order to perform functional testing. Today, however, powerful simulation systems exist in which a design of a new microprocessor may be functionally tested (i.e., functionally verified) before prototypes of the new microprocessor are manufactured. Such simulation systems typically include a functional model of a microprocessor under test. Functional testing of a functional model of a microprocessor under test allows design errors to be identified and corrected prior to the manufacture of hardware prototypes.
A substantial amount of the time and effort expended in complete functional testing of a new microprocessor is involved in creating all possible operating environments in which the microprocessor is to perform a desired activity and to produce a test result. It would thus be desirable to have a functional test generation system which consolidates a basic set of instructions required to establish all possible operating environments into a single "template" file. The user may then simply modify a copy of the template file as required and include instructions which cause the microprocessor to perform a desired activity and to produce a test result. It would also be desirable to allow the user to specify a desired operating environment at execution time, thus eliminating the need to modify and re-assemble the template file in order to verify proper operation of the microprocessor in each of the possible operating environments. Further, it would also be desirable to allow a user to select functional test generation for a simulation system, including a model of the microprocessor under test, or for a computer system including a hardware implementation of the microprocessor under test. Such a functional test generation system would increase the efficiency of the functional test generation process and facilitate the dual use of functional tests for design verification and product testing.